package main.test;

import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

public class test {
    public static void main(String[] args) throws ScriptException, NoSuchMethodException {
        ScriptEngineManager manager = new ScriptEngineManager();
        //得到脚本引擎
        ScriptEngine engine = manager.getEngineByName("JavaScript");
        String js = (String) engine.eval("var x = \"substr@Array@@@String@window@Expires@@16@innerHTML@new@false@868@0xEDB88320@try@A@@3@replace@0@@j@g@@reverse@split@setTimeout@13@@@eval@@2@@@@catch@@toString@@div@href@d@@var@1570978911@Path@@firstChild@@F@length@__jsl_clearance@join@@9ZT@charAt@@DOMContentLoaded@else@document@wiSD@Yi@parseInt@Sun@if@FK@while@@51@@8@@@@JgSe0upZ@createElement@@addEventListener@@@@onreadystatechange@@0xFF@RegExp@36@@1@01@for@charCodeAt@Oct@search@return@e@GMT@function@location@@@captcha@@cookie@attachEvent@@@@https@19@pathname@chars@fromCharCode@match@@@a@@challenge@toLowerCase@@1500@@@rOm9XFMtA3QKV7nYsPGT4lifyWwkq5vcjH2IdxUoCbhERLaz81DNB6@@f@\".replace(/@*$/, \"\").split(\"@\"),\n" +
                "    y = \"1h 2i=3e(){r('3f.1e=3f.3r+3f.3a.j(/[\\\\?|&]3i-47/,\\\\'\\\\')',4a);25.3k='1p=1i.d|k|'+(3e(){1h 4e=[3e(2i){3b 2i},3e(4e){3b 4e},3e(2i){3b 13('5.41('+2i+')')},3e(2i){37(1h 4e=k;4e<2i.1o;4e++){2i[4e]=28(2i[4e]).1b(33)};3b 2i.1q('')}],2i=[[[(-~~~{}&lt;&lt;-~~~{})-~[(-~~~{}&lt;&lt;-~~~{})]-~[(-~~~{}&lt;&lt;-~~~{})]]+(-~[(-~~~{}&lt;&lt;-~~~{})]+[[]][k])],'27',[((-~~~{}&lt;&lt;-~~~{})-~((-~~~{}&lt;&lt;-~{}-~{}))+[[]][k])+[-~[(-~~~{}&lt;&lt;-~~~{})]-~[(-~~~{}&lt;&lt;-~~~{})]]],'m',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~~~{})]]+[(-~~~{}&lt;&lt;-~~~{})-~[(-~~~{}&lt;&lt;-~~~{})]-~[(-~~~{}&lt;&lt;-~~~{})]]]];37(1h 49=k;49<2i.1o;49++){2i[49]=4e[[15,35,15,35,i,35,i,35,15,i,35,i,35,15,35,i,15,35,15,35,15][49]](2i[49])};3b 2i.1q('')})()+';7=29, 10-39-3q 9:36:2e 3d;1j=/;'};2a((3e(){f{3b !!6.2n;}19(3c){3b c;}})()){25.2n('23',2i,c)}24{25.3l('2r',2i)}\",\n" +
                "    f = function (x, y) {\n" +
                "        var a = 0, b = 0, c = 0;\n" +
                "        x = x.split(\"\");\n" +
                "        y = y || 99;\n" +
                "        while ((a = x.shift()) && (b = a.charCodeAt(0) - 77.5)) c = (Math.abs(b) < 13 ? (b + 48.5) : parseInt(a, 36)) + y * c;\n" +
                "        return c\n" +
                "    }, z = f(y.match(/\\w/g).sort(function (x, y) {\n" +
                "        return f(x) - f(y)\n" +
                "    }).pop());\n" +
                "while (z++) try {\n" +
                "    y.replace(/\\b\\w+\\b/g, function (y) {\n" +
                "        return x[f(y, z) - 1] || (\"_\" + y)\n" +
                "    });\n" +
                "    break\n" +
                "} catch (_) {\n" +
                "}");
//        System.out.println(js);
//        System.out.println(engine.get("y"));
//        System.out.println(js.substring(0,js.indexOf("if")-1));
//        engine.eval(js.substring(0,js.indexOf("if")-1));
//        System.out.println(engine.eval("document.cookie"));
       engine.eval("var x =  '__jsl_clearance=1571015172.023|0|' + (function () {\n" +
                "            var _1l = [function (_1n) {\n" +
                "                    return _1n\n" +
                "                }, function (_1l) {\n" +
                "                    return _1l\n" +
                "                }, (function () {\n return _1n" +
                "                })()],\n" +
                "                _2m = [[-~~~!{} + ((+!+[]) << (+!+[])) + ((+!+[]) << ((+!+[]) << (+!+[])))], [~~!{}], (-~~~!{} + [[]][0]) + [-~-~{}], [-~!{} - ~!{} - ~-~{} + ((+!+[]) << (+!+[])) + (-~-~{} ^ (+!+[]))], (-~~~!{} + [[]][0]) + [~~!{}], (-~~~!{} + [[]][0]) + (-~~~!{} + [[]][0]), (-~!{} - ~[-~-~{}] + [] + []), (((+!+[]) << (+!+[])) + (-~-~{}) * [-~-~{}] + [] + [[]][0]), [-~-~{}], [5], (8 + [[]][0]), (-~~~!{} + [[]][0]) + (-~[-~-~{}] + []), (-~[-~-~{}] + []), (-~~~!{} + [[]][0])];\n" +
                "            for (var _1n = 0; _1n < _2m.length; _1n++) {\n" +
                "                _2m[_1n] = _1l[[1, 0, 1, 0, 1, 0, 2, 1, 0, 1, 2, 1, 2, 1][_1n]]([(-~~~!{} + [[]][0]), 'A%3D', [-~-~{}], [(-~!{} - ~[-~-~{}] + [] + [])], [[~~!{}]], 'B', '%', 'st', [(-~~~!{} + [[]][0]) + [5]], (8 + [[]][0]), 'rqPwv', ({} + [] + [[]][0]).charAt((-~[] << 3)) + (!-[] + [] + []).charAt(-~~~!{}), 'RTCMYUbB', 'cZH'][_2m[_1n]])\n" +
                "            }\n" +
                "            return _2m.join('')\n" +
                "        })() + ';Expires=Mon, 14-Oct-19 02:06:12 GMT;Path=/;'");
        System.out.println(engine.get("x"));
    }
}
